package com.woniuxy.classdeans.service.impl;

import com.woniuxy.classdeans.mapper.TeacherInfoMapper;
import com.woniuxy.classdeans.service.TeacherInfoService;
import com.woniuxy.commons.entity.wyh.TeacherInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wangyanhui
 * @date 2020/7/16 - 20:16
 */
@Service
public class TeacherInfoServiceImpl implements TeacherInfoService{
        @Autowired
    private TeacherInfoMapper teacherInfoMapper;

    /**
     * 根据分页获取老师信息
     * @return
     */
    @Override
    public List<TeacherInfo> getallbypage() {
        return teacherInfoMapper.getallbypage();
    }

    /**
     * 获取所有老师信息
     * @return
     */
    public List<TeacherInfo> getAll() {

        return teacherInfoMapper.getAll();
    }

    /**
     * 根据老师id获取老师信息
     * @param TcId 老师id
     * @return
     */
    @Override
    public TeacherInfo getByTcid(int TcId) {
        return null;
    }


    //更新老师信息
    @Override
    public int updateTeacherInfo(TeacherInfo teacherInfo) {

        return teacherInfoMapper.updateTeacherInfo(teacherInfo);
    }

    //重置老师密码信息
    @Override
    public int resetPassword(TeacherInfo teacherInfo) {


        return teacherInfoMapper.resetPassword(teacherInfo);
    }
}
